{% extends "base.html" %}
{% block title %}Tools class notify{% endblock %}
{% block content %}

<div class="col-lg-8">
    <div class="panel panel-info">
        <div class="panel-heading">上课通知</div>
        <div class="panel-body">
            <form class="form-inline" method="POST">
              <div class="form-group">
                <label >cls_type：</label>
                <select class="form-control" name='cls_type'>
                          <option>python</option>
                          <option>linux</option>
                </select>
              </div>
              <div class="form-group">
                <label>num:</label>
                <select class="form-control" name='num'>
                          <option>1</option>
                          <option>2</option>
                          <option>3</option>
                          <option>4</option>
                          <option>5</option>
                          <option>6</option>
                          <option>7</option>
                </select>
              </div>
	              <div class="form-group">
	                <label>Time：</label>
	                <input class="form-control" name="time">
	              </div>
	           <div>
	              <div class="form-group">
	                <label>cls_Content:</label>
	                <input class="form-control" name="cls_content">
	              </div>
	              <button type="submit" class="btn btn-info">发送</button>
              </div>
            </form>
        </div>
        <div class="panel-footer">
            {% if result %}

                    <table class="table">
                      <thead><tr><th>username</th><th>status</th></tr></thead>
                      <tbody>
                         {% for data in result %}
                            {% if result[data].code == 0 %}
                                <tr class="success">
                                  <td>{{ result[data].username }}[{{ result[data].phone }}]</td>
                                  <td>{{ result[data].message }}</td>
                                </tr>
                            {% else %}
                                <tr class="danger">
                                  <td>{{ result[data].username }}[{{ result[data].phone }}]</td>
                                  <td>{{ result[data].message }}</td>
                                </tr>
                            {% endif %}
                         {% endfor %}
                      </tbody>
                      
                    </table>
            {% endif %}
        </div>
    </div>
</div>
{% endblock %}
